<section class="search-section">
    <form class="form-inline" role="form" name="appForm">
        <table class="table-form tc">
            <tr>
                <td><label for="app-name">App Name</label></td>
                <td>
                    <input type="text" ng-model="queryParams.appName" class="form-control" id="app-name" placeholder="">
                </td>
                <td><label for="cu-reference">CU Reference</label></td>
                <td>
                    <input type="text" ng-model="queryParams.appCuReference" class="form-control" id="cu-reference"
                           placeholder=""></td>
                <td><label>App Source Channel</label></td>
                <td>
                    <div class="dropdown" name="type" select-emu>
                        <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
                            <span class="choosen-value">All Source Channel</span>
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.sourceChannel = null">All Source
                                    Channel</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.sourceChannel = 1">Official
                                    Recommendation</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.sourceChannel = 2">Third Party
                                    Access</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.sourceChannel = 3">Free
                                    Developers</a>
                            </li>
                        </ul>
                    </div>
                </td>
                <td>
                    <button type="submit" class="btn btn-primary search-btn" ng-click="queryApp(1)"
                            ng-disabled="appForm.$invalid">Search
                    </button>
                </td>
            </tr>
            <tr>
                <td><label>Publish Status</label></td>
                <td>
                    <div class="dropdown" name="publishStatus" select-emu>
                        <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
                            <span class="choosen-value">Please Select</span>
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.releaseStatus = null">Please
                                    Select</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.releaseStatus = 1">Published</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1"
                                   ng-click="queryParams.releaseStatus = 0">Unpublished</a>
                            </li>
                        </ul>
                    </div>
                </td>
                <td><label>Label</label></td>
                <td>
                    <div class="dropdown" name="label" select-emu>
                        <button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">
                            <span class="choosen-value">Please Select</span>
                            <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu" role="menu">
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.label = null">Please Select</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.label = 'Update'">Update</a>
                            </li>
                            <li role="presentation">
                                <a role="menuitem" tabindex="-1" ng-click="queryParams.label = 'New'">New</a>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
    </form>

    <header class="main-content-header">
        <h5>Resource and Operation</h5>
    </header>
    <section class="operation">
        <button class="btn btn-primary" ng-click="doRecovery()">Recovery</button>
        <button class="btn btn-primary" ng-click="doDelete()">Delete Thoroughly</button>
        <a class="pull-right" add-host href="admin/#/app_manage">Back To App Management &gt;&gt;</a>
    </section>
    <section class="result">
        <table class="table table-result">
            <thead>
            <tr>
                <th width="8%">
                    <chkbox-all></chkbox-all>
                    All Select
                </th>
                <th width="5%">App ID</th>
                <th width="7%">App Name</th>
                <th width="7%">App Icon</th>
                <th width="7%">Label</th>
                <th width="9%">Publish Status</th>
                <th width="10%">App version</th>
                <th width="9%">OS Version</th>
                <th width="10%">Upload Time</th>
                <th width="14%">App Source Channel</th>
                <th width="8%">App Size</th>
                <th width="6%">Sorting</th>
            </tr>
            </thead>
            <tbody>
            <tr class="tr-container">
                <td colspan="100%">
                    <div class="tbody">
                        <table class="table table table-striped">
                            <tbody>
                            <tr ng-repeat="app in apps | orderBy:orderProp">
                                <td width="8%">
                                    <chkbox data-id="{{app.id}}"></chkbox>
                                </td>
                                <td width="5%">{{app.id}}</td>
                                <td width="7%">{{app.appName}}</td>
                                <td width="7%"><img class="app-icon" ng-src="{{app.appIcon}}"></td>
                                <td width="7%">{{app.label}}</td>
                                <td width="9%">{{app.releaseStatusStr}}</td>
                                <td width="10%">{{app.versionName}}</td>
                                <td width="9%">{{app.appOsVersion}}</td>
                                <td width="10.5%">{{app.createTime}}</td>
                                <td width="14%">{{app.sourceChannelStr}}</td>
                                <td width="8%">{{app.appSize | size}}</td>
                                <td width="5.5%"> {{app.appSequence}}</td>
                            </tr>
                            <tr class="page-box">
                                <td colspan="11">
                                    <div class="pagination" id="pagination"></div>
                                </td>
                            </tr>
                            </tbody>
                        </table>
                    </div>
                </td>
            </tr>
            </tbody>
        </table>
    </section>
</section>

<!--confirm modal-->
<div confirm-modal></div>

<!--alert modal-->
<div alert-modal></div>